// components/book/index.js
Component({
    /**
   * 组件的属性列表
   */
    properties: {
        book: Object,
        showLike: {
            type: Boolean,
            value: true
        }

    },

    /**
   * 组件的初始数据
   */
    data: {

    },

    attached: function () {
        // console.log(this.properties.book)
    },

    /**
   * 组件的方法列表
   */
    methods: {
        onTap () {
            const { id } = this.properties.book
            wx.navigateTo({
                url: `/pages/book-detail/book-detail?id=${id}`
            })
        }

    }
})
